<template>
  <div class="driver">
    <div class="close" @click="handleClose">x</div>
    <div id="driver"></div>
  </div>
</template>

<script>

  export default {
    name: "driver",
    data() {
      return {
        data: {}
      }
    },
    methods: {
      handleClose() {
        this.$parent.showDriver = false;
        if (this.$parent.$refs.toolbar.driving){
          this.$parent.$refs.toolbar.driving.clear();
        } if (this.$parent.$refs.search.driving){
          this.$parent.$refs.search.driving.clear();
        }
      }
    },
    mounted() {

    }
  }
</script>

<style scoped lang="less">

  .driver {
    width: 100%;
    height: 50%;
    position: absolute;
    bottom: 0;
  }

  .close {
    float: right;
  }
</style>
